/*
 * 文件名： BankCustAppInfoDAOImpl.java
 * 
 * 工程名称: bis-dao
 *
 * Gopay
 *
 * 创建日期： 2016年9月26日
 *
 * Copyright(C) 2016, by www.gopay.com.cn Inc.All rights reserved.
 *
 * 原始作者: 宣广海
 *
 */
package com.gopay.bis.dao.bankorder.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.gopay.bis.dao.bankorder.BankCustAppInfoDAO;
import com.gopay.common.base.dao.impl.BaseDAOImpl;
import com.gopay.common.domain.bank.CustAppInfo;

/**
 * 
 *
 * @author 宣广海
 *
 * @version 
 *
 * @since 2016年9月26日
 */
@Repository(value = "bankCustAppInfoDAO")
public class BankCustAppInfoDAOImpl extends BaseDAOImpl<CustAppInfo, String> implements BankCustAppInfoDAO{
	@Override
	public CustAppInfo getCustAppInfo(String appid,String bankChann) {
		StringBuffer hql = new StringBuffer();
        hql.append("from CustAppInfo where appId=:appId ");
        hql.append("and status=:status ");
        hql.append("and intrfaceChannelCode=:intrfaceChannelCode ");
        Map<String, Object> param = new HashMap<String, Object>();
        param.put("appId", appid);
        param.put("status","01");
        param.put("intrfaceChannelCode",bankChann);
        List<CustAppInfo> infoQuerys = this.findByHql(hql.toString(), param);

        if (infoQuerys != null && infoQuerys.size() != 0) {
            return infoQuerys.get(0);
        } else {
            return null;
        }
	}

	

}
